package com.swx.identityservice.dtos.role;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.swx.identityservice.models.ScbpDept;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.util.Date;

@Data
@ApiModel("输出角色Dto")
public class RoleOutputDto {

    private ScbpDept scbpDept;

    @ApiModelProperty(name = "角色id")
    private Integer id;

    @ApiModelProperty(name = "角色名称")
    private String name;

    @ApiModelProperty(value = "部门名称",example = "公诉一处")
    @Column(name = "AffiliatedDept")
    @Transient
    private String affiliateddept;

    @Transient
    private Integer did;


    @ApiModelProperty(value = "单位名称",example = "高检院")
    @Column(name = "AffiliatedUnit")
    @Transient
    private String affiliatedunit;

    @ApiModelProperty(name = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creationtime;

    @ApiModelProperty(name = "创建人Id")
    private Integer creatoruserid;

    @ApiModelProperty(name = "最后修改时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastmodificationtime;

    @ApiModelProperty(name = "更新人Id")
    private Integer lastmodifieruserid;

    private Integer dealroleid;

    /**
     * 所属部门id
     */
    @Column(name = "AffiliatedDeptId")
    private Integer affiliateddeptid;

    /**
     * 所属单位id
     */
    @Column(name = "AffiliatedUnitId")
    private Integer affiliatedunitid;

    /**
     * 审批角色id
     */
    @Column(name = "DealRole")
    @Transient
    private String dealrole;

    /**
     * 角色排序
     */
    @Column(name = "RoleSort")
    private Integer rolesort;

}
